package com.dingreading.cloud.app.util;

import com.dingreading.cloud.app.entity.Members;
import com.dingreading.cloud.app.entity.StoreSignIn;

import java.util.Date;

public class StoreSignInUtil {

    /**
     * 生成签到记录
     */
    public static StoreSignIn getStoreSignIn(
            Members members, String corpUid, Long storeId, String storeUid, String storeName,
            Date arrivalTime, Integer signInType, Long signInStaffId
    ) {
        StoreSignIn storeSignIn = new StoreSignIn();
        storeSignIn.setCorpUid(corpUid);
        storeSignIn.setStoreId(storeId);
        storeSignIn.setStoreUid(storeUid);
        storeSignIn.setStoreName(storeName);
        storeSignIn.setMemberId(members.getId());
        storeSignIn.setMemberUid(members.getUid());
        storeSignIn.setFullName(members.getFullName());
        storeSignIn.setMemberName(members.getMemberName());
        storeSignIn.setCostName(members.getCostName());
        storeSignIn.setMemberLevel(members.getMemberLevel());
        storeSignIn.setStatus(1);
        storeSignIn.setSignInType(signInType);
        storeSignIn.setSignInStaffId(signInStaffId);
        storeSignIn.setArrivalTime(arrivalTime);
        return storeSignIn;
    }

}
